<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.io.PrintWriter"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
  </head>
  
  <body>
  
    <c:if test="${exp != null}">
	    <h3>发生不可预料的服务器错误，请联系开发或运维人员解决。</h3>
	    <h4>异常信息：</h4>
	    <div style="border: 1px dashed #faa; padding:4px;background-color: #ddf">
	    ${exp.message }
	    </div>
	    <h4>异常堆栈：</h4>
	    <div style="border: 1px dashed #faa; padding:4px;background-color: #ddf">
	    <pre>
	    <%
	    Exception exp = (Exception)request.getAttribute("exp");
	    exp.printStackTrace(new PrintWriter(out));
	     %>
	    </pre>
	    </div>
    </c:if>
    
  </body>
</html>
